package cn.exrick.xboot.modules.content.serviceimpl;

import cn.exrick.xboot.common.vo.SearchVo;
import cn.exrick.xboot.modules.base.dao.RoleDepartmentDao;
import cn.exrick.xboot.modules.base.entity.RoleDepartment;
import cn.exrick.xboot.modules.content.dao.HontRoleDepartmentDao;
import cn.exrick.xboot.modules.content.entity.HontRoleDepartment;
import cn.exrick.xboot.modules.content.service.HontRoleDepartmentService;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.lang.Nullable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.persistence.criteria.*;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;


/**
 * 岗位接口实现
 * @author hml
 */
@Slf4j
@Service
@Transactional
public class HontRoleDepartmentServiceImpl implements HontRoleDepartmentService {

    @Autowired
    private HontRoleDepartmentDao roleDepartmentDao;

    @Override
    public HontRoleDepartmentDao getRepository() {
        return roleDepartmentDao;
    }

    @Override
    public List<HontRoleDepartment> findByHontRoleId(String roleId) {

        return roleDepartmentDao.findByHontRoleId(roleId);
    }

    @Override
    public void deleteByHontRoleId(String roleId) {

        roleDepartmentDao.deleteByHontRoleId(roleId);
    }

    @Override
    public void deleteByHontDepartmentId(String departmentId) {

        roleDepartmentDao.deleteByHontDepartmentId(departmentId);
    }

}